'\" te
.\" Copyright 1989 AT&T. Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SIGSETOPS 3C "Dec 19, 2003"
.SH NAME
sigsetops, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \-
manipulate sets of signals
.SH SYNOPSIS
.LP
.nf
#include <signal.h>

\fBint\fR \fBsigemptyset\fR(\fBsigset_t *\fR\fIset\fR);
.fi

.LP
.nf
\fBint\fR \fBsigfillset\fR(\fBsigset_t *\fR\fIset\fR);
.fi

.LP
.nf
\fBint\fR \fBsigaddset\fR(\fBsigset_t *\fR\fIset\fR, \fBint\fR \fIsigno\fR);
.fi

.LP
.nf
\fBint\fR \fBsigdelset\fR(\fBsigset_t *\fR\fIset\fR, \fBint\fR \fIsigno\fR);
.fi

.LP
.nf
\fBint\fR \fBsigismember\fR(\fBsigset_t *\fR\fIset\fR, \fBint\fR \fIsigno\fR);
.fi

.SH DESCRIPTION
.sp
.LP
These functions manipulate \fBsigset_t\fR data types, representing the set of
signals supported by the implementation.
.sp
.LP
The \fBsigemptyset()\fR function initializes the set pointed to by \fIset\fR to
exclude all signals defined by the system.
.sp
.LP
The \fBsigfillset()\fR function initializes the set pointed to by \fIset\fR to
include all signals defined by the system.
.sp
.LP
The \fBsigaddset()\fR function adds the individual signal specified by the
value of \fIsigno\fR to the set pointed to by \fIset\fR.
.sp
.LP
The \fBsigdelset()\fR function deletes the individual signal specified by the
value of \fIsigno\fR from the set pointed to by \fIset\fR.
.sp
.LP
The \fBsigismember()\fR function checks whether the signal specified by the
value of \fIsigno\fR is a member of the set pointed to by \fIset\fR.
.sp
.LP
Any object of type \fIsigset_t\fR must be initialized by applying either
\fBsigemptyset()\fR or \fBsigfillset()\fR before applying any other operation.
.SH RETURN VALUES
.sp
.LP
Upon successful completion, the \fBsigismember()\fR function returns \fB1\fR if
the specified signal is a member of the specified set, or \fB0\fR if it is not.
.sp
.LP
Upon successful completion, the other functions return \fB0\fR. Otherwise
\fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the error.
.SH ERRORS
.sp
.LP
The \fBsigaddset()\fR, \fBsigdelset()\fR, and \fBsigismember()\fR functions
will fail if:
.sp
.ne 2
.na
\fB\fBEINVAL\fR\fR
.ad
.RS 10n
The value of the \fIsigno\fR argument is not a valid signal number.
.RE

.sp
.LP
The \fBsigfillset()\fR function will fail if:
.sp
.ne 2
.na
\fB\fBEFAULT\fR\fR
.ad
.RS 10n
The \fIset\fR argument specifies an invalid address.
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
_
MT-Level	Async-Signal-Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR sigaction (2),
.BR sigpending (2),
.BR sigprocmask (2),
.BR sigsuspend (2),
.BR signal.h (3HEAD),
.BR attributes (7),
.BR standards (7)
